﻿using System.Windows.Data;
using Project5188.BUS;
using Project5188.BUS.Personnel;

namespace Project5188.Client.Personnel
{
    /// <summary>
    /// Interaction logic for AdminInfoReportPage.xaml
    /// </summary>
    public partial class AdminInfoReportPage
    {
        private CollectionViewSource _resources;

        public AdminInfoReportPage()
            : base(Extensions.PageNames.AdminInfoReportPage)
        {
            InitializeComponent();

            BindData();
        }

        private void BindData()
        {
            var personnelNominees = new PersonnelNominees();
            _resources = Resources["personnelStatusViewSource"] as CollectionViewSource;
            if (_resources != null) _resources.Source = personnelNominees.GetPersonnelNomineeReport();


            var personnelWorkouts = new PersonnelWorkOuts();
            _resources = Resources["workoutReasonsViewSource"] as CollectionViewSource;
            if (_resources != null) _resources.Source = personnelWorkouts.GetWorkoutCausesReport();

            _resources = Resources["workoutStylesViewSource"] as CollectionViewSource;
            if (_resources != null) _resources.Source = personnelWorkouts.GetWorkoutStylesReport();
        }
    }
}
